package cn.ilikes.tools.nosql.jpa.classloads.porxys;

import cn.ilikes.tools.nosql.jpa.JPASQLPersistenUnitEnv;
import cn.ilikes.tools.nosql.jpa.clients.AbClient;
import cn.ilikes.tools.nosql.jpa.metadatas.EntityMetaData;
import cn.ilikes.tools.nosql.jpa.metadatas.elements.EntityFields;
import cn.ilikes.tools.nosql.jpa.persistences.contexts.AbstractContext;

public interface LazyInitializerFactory {

	/**
	 * 
	 * @param entityFields
	 * @param entityMetaData
	 *                  目标对象
	 * @param keyId
	 * @param client
	 * @return
	 */
	Object getProxy(final EntityFields entityFields, final EntityMetaData targetEntityMetaData, final Object keyId, AbstractContext abstractContext);

	Object getListProxy(AbClient client, EntityFields entityFields, Object entity, JPASQLPersistenUnitEnv persistenUnitEnv);

	Object getProxy(final EntityMetaData entityMetaData, final Object keyId, AbstractContext abstractContext);

}
